//
//  PosterDetailModel.m
//  DayByDay
//
//  Created by dllo on 16/5/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PosterDetailModel.h"

@implementation PosterDetailModel


//- (instancetype)init {
//    self = [super init];
//    if (self) {
//        self.detailImageModel = [PosterDetailImageModel new];
//        self.detailOwnerModel = [PosterDetailOwnerModel new];
//        [self setModelValue];
//    }
//    return self;
//}
- (void)setOwner:(NSDictionary *)owner {
    if (owner) {
        _owner = [NSDictionary dictionaryWithDictionary:owner];
        _detailOwnerModel =  [PosterDetailOwnerModel new];
        [_detailOwnerModel setValuesForKeysWithDictionary:_owner];
    }
}

- (void)setImage:(NSDictionary *)image {
    if (image) {
        _image = [NSDictionary dictionaryWithDictionary:image];
        _detailImageModel = [PosterDetailImageModel new];
        [_detailImageModel setValuesForKeysWithDictionary:_image];
    }
}

- (void)setSongs:(NSMutableArray *)songs {
    _songs = [NSMutableArray array];
    for (NSDictionary *dic in songs) {
        PosterDetailSongsModel *model =[PosterDetailSongsModel new];
        [model setValuesForKeysWithDictionary:dic];
        [_songs addObject:model];
    }
}


@end
